<template>
  <div class="init_main">
    <p class="name_sty">{{ name }}</p>
    <el-row>
      <el-col :span="4">
        <el-image
          style="width: 180px; height: 200px"
          :src="url"
          fit="cover"
        ></el-image>
        <el-tree
          :data="data"
          node-key="id"
          highlight-current
          @node-click="tree_row_click"
          class="tree_box"
        >
          <span class="custom-tree-node" slot-scope="{ node }">
            <span><i class="el-icon-folder-opened"></i> {{ node.label }}</span>
          </span>
        </el-tree>
      </el-col>
      <el-col :span="20">
        <div class="table_box">
          <jbxx v-if="isNowTable == '基本信息'" :todo_data="todo_data"></jbxx>
          <xlxw v-if="isNowTable == '学历学位'" :todo_data="todo_data"></xlxw>
          <hsz v-if="isNowTable == '护士证'" :todo_data="todo_data"></hsz>
          <yyzw v-if="isNowTable == '医院职务'" :todo_data="todo_data"></yyzw>
          <gwlb v-if="isNowTable == '岗位职别'" :todo_data="todo_data"></gwlb>
          <nj v-if="isNowTable == '能级'" :todo_data="todo_data"></nj>
          <hlzc v-if="isNowTable == '护理职称'" :todo_data="todo_data"></hlzc>
          <jxzc v-if="isNowTable == '教学职称'" :todo_data="todo_data"></jxzc>
          <dszg v-if="isNowTable == '导师资格'" :todo_data="todo_data"></dszg>
          <zkhs v-if="isNowTable == '专科护士'" :todo_data="todo_data"></zkhs>
          <gzjl v-if="isNowTable == '工作经历'" :todo_data="todo_data"></gzjl>
          <kspx v-if="isNowTable == '科室培训'" :todo_data="todo_data"></kspx>
          <fkspx
            v-if="isNowTable == '非科室培训'"
            :todo_data="todo_data"
          ></fkspx>
          <wcxxjl
            v-if="isNowTable == '外出学习记录'"
            :todo_data="todo_data"
          ></wcxxjl>
          <wcpxjl
            v-if="isNowTable == '外出培训记录'"
            :todo_data="todo_data"
          ></wcpxjl>
          <hskhjl
            v-if="isNowTable == '护士考核记录'"
            :todo_data="todo_data"
          ></hskhjl>
          <xhskhjl
            v-if="isNowTable == '新护士考核记录'"
            :todo_data="todo_data"
          ></xhskhjl>
          <hljskhjl
            v-if="isNowTable == '护理技术考核记录'"
            :todo_data="todo_data"
          ></hljskhjl>
          <lwdj v-if="isNowTable == '论文等级'" :todo_data="todo_data"></lwdj>
          <bljl v-if="isNowTable == '不良记录'" :todo_data="todo_data"></bljl>
          <hrhsjc
            v-if="isNowTable == '好人好事/奖罚'"
            :todo_data="todo_data"
          ></hrhsjc>
          <kycg v-if="isNowTable == '科研成果'" :todo_data="todo_data"></kycg>
          <xjsyj
            v-if="isNowTable == '新技术引进'"
            :todo_data="todo_data"
          ></xjsyj>
          <fmzl v-if="isNowTable == '发明专利'" :todo_data="todo_data"></fmzl>
          <skjl v-if="isNowTable == '授课交流'" :todo_data="todo_data"></skjl>
          <sx v-if="isNowTable == '实习'" :todo_data="todo_data"></sx>
          <jx v-if="isNowTable == '进修'" :todo_data="todo_data"></jx>
          <dp v-if="isNowTable == '代培'" :todo_data="todo_data"></dp>
          <xxqjjl
            v-if="isNowTable == '学习请假记录'"
            :todo_data="todo_data"
          ></xxqjjl>
          <jxhsgl
            v-if="isNowTable == '进修护士管理'"
            :todo_data="todo_data"
          ></jxhsgl>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import jbxx from "@/views/RYDA/table/jbxx.vue"; // 基本信息
import xlxw from "@/views/RYDA/table/xlxw.vue"; // 学历学位
import hsz from "@/views/RYDA/table/hsz.vue"; // 护士证
import yyzw from "@/views/RYDA/table/yyzw.vue"; // 医院职务
import gwlb from "@/views/RYDA/table/gwlb.vue"; // 岗位职别
import nj from "@/views/RYDA/table/nj.vue"; // 能级
import hlzc from "@/views/RYDA/table/hlzc.vue"; // 护理职称
import jxzc from "@/views/RYDA/table/jxzc.vue"; // 教学职称
import dszg from "@/views/RYDA/table/dszg.vue"; // 导师资格
import zkhs from "@/views/RYDA/table/zkhs.vue"; // 专科护士
import gzjl from "@/views/RYDA/table/gzjl.vue"; // 工作经历
import kspx from "@/views/RYDA/table/kspx.vue"; // 科室培训
import fkspx from "@/views/RYDA/table/fkspx.vue"; // 非科室培训
import wcxxjl from "@/views/RYDA/table/wcxxjl.vue"; // 外出学习记录
import wcpxjl from "@/views/RYDA/table/wcpxjl.vue"; // 外出培训记录
import hskhjl from "@/views/RYDA/table/hskhjl.vue"; // 护士考核记录
import xhskhjl from "@/views/RYDA/table/xhskhjl.vue"; // 新护士考核记录
import hljskhjl from "@/views/RYDA/table/hljskhjl.vue"; // 护理技术考核记录
import lwdj from "@/views/RYDA/table/lwdj.vue"; // 论文等级
import bljl from "@/views/RYDA/table/bljl.vue"; // 不良记录
import hrhsjc from "@/views/RYDA/table/hrhsjc.vue"; // 好人好事奖罚
import kycg from "@/views/RYDA/table/kycg.vue"; // 科研成果
import xjsyj from "@/views/RYDA/table/xjsyj.vue"; // 新技术引进
import fmzl from "@/views/RYDA/table/fmzl.vue"; // 发明专利
import skjl from "@/views/RYDA/table/skjl.vue"; // 授课交流
import sx from "@/views/RYDA/table/sx.vue"; // 实习
import jx from "@/views/RYDA/table/jx.vue"; // 进修
import dp from "@/views/RYDA/table/dp.vue"; // 代培
import xxqjjl from "@/views/RYDA/table/xxqjjl.vue"; // 学习请假记录
import jxhsgl from "@/views/RYDA/table/jxhsgl.vue"; // 进修护士管理
export default {
  components: {
    jbxx,
    xlxw,
    hsz,
    yyzw,
    gwlb,
    nj,
    hlzc,
    jxzc,
    dszg,
    zkhs,
    gzjl,
    kspx,
    fkspx,
    wcxxjl,
    wcpxjl,
    hskhjl,
    xhskhjl,
    hljskhjl,
    lwdj,
    bljl,
    hrhsjc,
    kycg,
    xjsyj,
    fmzl,
    skjl,
    sx,
    jx,
    dp,
    xxqjjl,
    jxhsgl,
  },
  data() {
    return {
      name: "",
      data: [
        {
          id: 1,
          label: "基本信息",
        },
        {
          id: 2,
          label: "学历学位",
        },
        {
          id: 3,
          label: "护士证",
        },
        {
          id: 4,
          label: "医院职务",
        },
        {
          id: 5,
          label: "岗位职别",
        },
        {
          id: 6,
          label: "能级",
        },
        {
          id: 7,
          label: "职称",
          children: [
            {
              id: "7_1",
              label: "护理职称",
            },
            {
              id: "7_2",
              label: "教学职称",
            },
          ],
        },
        {
          id: 8,
          label: "导师资格",
        },
        {
          id: 9,
          label: "专科护士",
        },
        {
          id: 10,
          label: "工作经历",
        },
        {
          id: 11,
          label: "培训",
          children: [
            {
              id: "11_1",
              label: "科室培训",
            },
            {
              id: "11_2",
              label: "非科室培训",
            },
            {
              id: "11_3",
              label: "外出学习记录",
            },
            {
              id: "11_4",
              label: "外出培训记录",
            },
          ],
        },
        {
          id: 12,
          label: "考核",
          children: [
            {
              id: "12_1",
              label: "护士考核记录",
            },
            {
              id: "12_2",
              label: "新护士考核记录",
            },
            {
              id: "12_3",
              label: "护理技术考核记录",
            },
          ],
        },
        {
          id: 13,
          label: "论文等级",
        },
        {
          id: 14,
          label: "奖惩",
          children: [
            {
              id: "14_1",
              label: "不良记录",
            },
            {
              id: "14_2",
              label: "好人好事/奖罚",
            },
          ],
        },
        {
          id: 15,
          label: "科研成果",
        },
        {
          id: 16,
          label: "新技术引进",
        },
        {
          id: 17,
          label: "发明专利",
        },
        {
          id: 18,
          label: "授课交流",
        },
        {
          id: 19,
          label: "实习",
        },
        {
          id: 20,
          label: "进修",
        },
        {
          id: 21,
          label: "代培",
        },
        {
          id: 22,
          label: "学习请假记录",
        },
        {
          id: 23,
          label: "进修护士管理",
        },
      ],
      isNowTable: "",
      url: "https://ts1.cn.mm.bing.net/th/id/R-C.afd45ee1583861f7c42cbcb961de5386?rik=TnXP43Q5UtGJyw&riu=http%3a%2f%2fbpic.588ku.com%2felement_origin_min_pic%2f01%2f48%2f75%2f3557443c194e282.jpg&ehk=D36k4SOG6w9QO9N8XywlnCNBQsnaImJKsIZlV%2b35KF4%3d&risl=&pid=ImgRaw&r=0",
      todo_data: {},
    };
  },
  mounted() {
    this.name = this.$route.meta.title;
    this.todo_data = {
      人员ID: this.$route.query.人员ID,
      人员姓名: this.$route.query.人员姓名,
      按钮权限: this.$route.query.按钮权限,
    };
    this.isNowTable = "基本信息";
  },
  methods: {
    tree_row_click(data, node) {
      if (data.children) {
        return;
      } else {
        this.isNowTable = data.label;
      }
    },
  },
};
</script>

<style scoped lang='scss'>
.init_main {
  background-color: #fff;
  height: calc(100vh - 60px);
  border: 1px solid #333;
  border-radius: 5px;
  margin: 5px;
  padding: 10px;
  .name_sty {
    color: #000;
    font-weight: 700;
    font-size: 18px;
    font-family: "FangSong";
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
  }
}
.tree_box {
  height: calc(100vh - 330px);
  overflow: auto;
}
.table_box {
  height: calc(100vh - 130px);
  overflow: hidden;
}
</style>